package com.echat.companydata;

import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import com.echat.companydata.util.CompanyDataContextInitializer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;

//@EnableApolloConfig
@EnableDiscoveryClient
@ComponentScan("com.echat")
@SpringBootApplication
@Import({CompanyDataContextInitializer.class})
public class CompanyDataApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(CompanyDataApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(CompanyDataApplication.class);
    }
}
